<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
 .box{
   width: 200px;
   height: 200px;
   background-color: #0000ff;
   animation: pang 3000ms 3;
 }
 @keyframes pang{
   0%{
     width: 200px;
     height: 200px;
   }
   100%{
     width: 600px;
     height: 300px;
   }
 }
  </style>
</head>
<body>
<div class="box"></div>
</body>
<script>
  var box=document.querySelector('.box');
  box.addEventListener('transitionend',function(){
    console.log(123);
  })

</script>
</html>